﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoadHousingDetail.aspx.cs"
    Inherits="ZLDC.Estate.SM.LoadHousingDetail" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>旧系统盘源详情</title>
    <base target="_self"></base>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="divHead">
        <asp:Button ID="btnFirst" runat="server" Text="首条" CssClass="button_bak2"></asp:Button><asp:Button
            ID="btnPrev" runat="server" Text="上一条" CssClass="button_bak2"></asp:Button><asp:Button
                ID="btnNext" runat="server" Text="下一条" CssClass="button_bak2"></asp:Button><asp:Button
                    ID="btnLast" runat="server" Text="尾条" CssClass="button_bak2"></asp:Button>
        &nbsp;&nbsp;
        <asp:Button ID="btnLoad" runat="server" CssClass="button_bak2" Text="同步到新系统" OnClientClick="btnLoad_Click()" />
    </div>
    【基本信息】
    <br />
    <div id="divSearch" style="margin-top: 3px; text-align: center;">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
            <tr>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    楼盘栋阁：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sBuildName"></span>
                </td>
                <td width="11%" align="right" bgcolor="#F7F7F7">
                    房号：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sRoomNo"></span>
                </td>
                <td width="6%" align="right" bgcolor="#F7F7F7">
                    面积：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sAcreage"></span>&nbsp;m2
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    租售价：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sTotalprice"></span>&nbsp;&nbsp;<span id="sUnitPrice"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    户型：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sRoomHall"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    朝向：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sDirect"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    状态：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="spanStatus"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    是否封盘：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="spanStatus1"></span>
                </td>
                <td width="10%" align="right" bgcolor="#F7F7F7">
                    交易：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sTradetype"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    开盘人：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sMarkUser"></span><span id="sMarkUdept"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    时间：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sMarkDate"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    电话：
                </td>
                <td bgcolor="#FFFFFF">
                    <span id="sMarkTel" runat="server"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    盘源编号：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sId"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    城区片区：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sDname"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    最后跟进时间：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sUDDate"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    用途：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sUse"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    类型：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sHouseType"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    查看次数：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sClickCount"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    是否独家：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sIsOnly"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    签独家人员：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOnlyUser"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    签独家时间：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sOnlyDate"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    营业税：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sMark2"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    房产证：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPocStatus"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    房产证号：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPocNo"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    登记人：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAddUser"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    登记时间：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sAddDate"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    产权：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPropertyRight"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    来源：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sSource"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    装修：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sFitment"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    现状：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sUseStatus"></span>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#F7F7F7">
                    样式：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sHouseStyle"></span>
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    物业费用：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sPropertyFare"></span>元/m2
                </td>
                <td align="right" bgcolor="#F7F7F7">
                    备注：
                </td>
                <td bgcolor="#FFFFFF" style="padding-left: 10px;">
                    <span id="sRemark"></span>
                </td>
            </tr>
        </table>
    </div>
    </form>
    <input id="hID" name="hID" runat="server" type="hidden" />

    <script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../js/LexunJS.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(document).ready(function() {
            var id = LexunJS.GetQueryString("id"); // 盘源ID
            if (id > 0) $("#hID").val(id);

            showDetail(id);
        });

        // 查询详细
        function showDetail(id) {
            $.ajax({
                type: 'POST',
                url: '../Handler/HandlerLoad.ashx',
                data: 'act=loadhousing_detail&id=' + id,
                timeout: '20000',
                error: function() {
                    alert("修改失败！");
                },
                success: function(json) {
                    showDetailCallBack(json);
                }
            });
        }

        function showDetailCallBack(response) {
            var json = eval("(" + response + ")");
            var record = json.record;

            if (record == null || record.length == 0) return;

            var recordLength = record.length;
            for (var i = 0; i < recordLength; i++) {
                $("#sId").text(record[i].pty_id);
                $("#sDname").text(record[i].dname + record[i].aname);
                $("#sBuildName").text(record[i].ename + record[i].bname);
                $("#sRoomNo").text(record[i].floor + "楼" + record[i].roomno);
                $("#sAcreage").text(record[i].acreage);
                $("#sTotalprice").text(record[i].pricettl);
                $("#sUnitPrice").text("单价:" + record[i].priceunit + "元");
                $("#sTradetype").text(record[i].tradetype);
                $("#sRoomHall").text(record[i].ftwc);
                $("#sDirect").text(record[i].direct);
                $("#sUse").text(record[i].usage);
                $("#sHouseType").text(record[i].groundtype);
                $("#sHouseStyle").text(record[i].structure);
                $("#sPropertyRight").text(record[i].fumiture);
                $("#sPocNo").text();    // 房产证号
                $("#sSource").text(record[i].infofrom);
                $("#sFitment").text(record[i].decorate);
                $("#sUseStatus").text();    // 现状

                $("#sMarkUser").text(record[i].makename);
                $("#sMarkDate").text(record[i].makedate);
                if (record[i].makedept != "")
                    $("#sMarkUdept").text("[" + record[i].makedept + "]");

                $("#spanStatus").text(record[i].pty_state);

                $("#sUDDate").text(record[i].lastflwdate);
                $("#sClickCount").text();
                $("#sAddDate").text(record[i].regdate);
                $("#sAddUser").text(record[i].regname);
                $("#sPropertyFare").text(record[i].mgprice);
                $("#sPocStatus").text();
                $("#sRemark").text(record[i].important_notes);
            }
        }

        // 同步到新系统
        function btnLoad_Click() {
            var id = $("#hID").val();
            var path = "LoadHousingDialog.aspx?id=" + id;
            var parameter = "同步到新系统";
            var style = "dialogWidth:650px; dialogHeight:200px; status:0;scroll:1; help:0; resizable:1;Scrollbars=yes,Toolbar=no,Location=no,Direction=no,Resizeable=no";

            window.showModalDialog(path, parameter, style);
        }

    
    </script>

</body>
</html>
